package com.xiaocg.mediator;

public class MediatorTest {

    public static void main(String[] args) {
        MediatorStructure mediator = new MediatorStructure();

        Tenant p = new Tenant("张三",mediator);
        HouseOwner p1 = new HouseOwner("李四",mediator);

        mediator.setTenant(p);
        mediator.setHouseOwner(p1);

        p.constant("我要租3居室");
        p1.constant("我有3居室,你要租吗");
    }
}
